import { createApp } from 'vue'

import App from './App.vue'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
//忽略当前文件ts类型的检测否则有红色提示(打包会失败)

//暗黑模式需要的样式
import 'element-plus/theme-chalk/dark/css-vars.css'

//@ts-ignore
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import 'virtual:svg-icons-register'

import gloablComponent from './components/index'
import '@/styles/index.scss'

//引入路由
import router from './router'

//引入仓库
import pinia from './store'
//引入路由鉴权文件
import './permisstion'
const app = createApp(App)

//引入自定义指令文件
import { isHasButton } from '@/directive/has'
isHasButton(app)

app.use(ElementPlus, {
  locale: zhCn,
})
app.use(router)
app.use(pinia)

app.use(gloablComponent)
app.mount('#app')
